Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.default = void 0;

var _debounce = _interopRequireDefault(require("./debounce.js"));

function _interopRequireDefault(e) {
    return e && e.__esModule ? e : {
        default: e
    };
}

function _typeof(e) {
    return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
        return typeof e;
    } : function(e) {
        return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
    })(e);
}

function isObject(e) {
    var t = _typeof(e);
    return null != e && ("object" == t || "function" == t);
}

function throttle(e, t, o) {
    var n = !0, r = !0;
    if ("function" != typeof e) throw new TypeError("Expected a function");
    return isObject(o) && (n = "leading" in o ? !!o.leading : n, r = "trailing" in o ? !!o.trailing : r), 
    (0, _debounce.default)(e, t, {
        leading: n,
        maxWait: t,
        trailing: r
    });
}

var _default = throttle;

exports.default = _default;